package com.magiccompass.alipay.barcode.service;

import java.util.List;

import javax.annotation.Resource;

import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.magiccompass.alipay.barcode.entity.AppDictionary;

@Service("systemService")
@Transactional
public class SystemServiceImpl implements SystemService {
	@Resource(name="sessionFactory")
	private SessionFactory sessionFactory;

	@Override
	public List<AppDictionary> getAppDictionaryDBList() {
		Session session = sessionFactory.getCurrentSession();
		Criteria criteria = session.createCriteria(AppDictionary.class);
		List<AppDictionary> allAppDictionaryList = (List<AppDictionary>)criteria.list();
		return allAppDictionaryList;
	}

}
